Skip to content

Improve transit search and setup - #3

Merged
CJFData merged 7 commits into
CJFData:pico-transitfrom
jbriones95:feature/rtd-ripta-live
Aug 7, 2026
Merged

Improve transit search and setup#3
CJFData merged 7 commits into
CJFData:pico-transitfrom
jbriones95:feature/rtd-ripta-live

Conversation

@jbriones95

@jbriones95 jbriones95 commented Aug 6, 2026

Copy link
Copy Markdown

What changed

  • Added a search field at the top of route lists.
  • Added RTD and Bustang schedule and realtime support.
  • Restored live RIPTA updates with a narrowly scoped network exception.
  • Made GTFS updates safer and more reliable.
  • Included the Light Keyboard UI source locally, so builds no longer need private Maven credentials.

Testing

  • ./gradlew :tool:assembleDebug succeeds.
  • Installed and verified the debug build on a connected Light Phone.

- Merge Bustang GTFS into RTD Denver as an additional static feed, with
  per-feed ID namespacing (feed1:) to prevent key collisions.
- Rework GtfsIngestor to build a temp database and atomically move it into
  place, avoiding deleting an in-use database (SQLiteReadOnlyDatabaseException).
- Use ZipFile instead of ZipInputStream for reliable entry reads.
- Serialize ingestion with a mutex and cancel the previous ingest job when
  switching agencies.
- Store feed URLs in feed_meta.txt so a changed URL forces a refresh.
- Support directionless routes (nullable directionId) end-to-end and
  auto-skip direction selection when a route has no directions.
- Disable RIPTA realtime (HTTP-only feeds) and remove the :netconfig
  cleartext exception module.
Copilot AI lite review requested due to automatic review settings August 6, 2026 19:44

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR expands the transit tool’s GTFS ingestion and browsing capabilities by supporting multi-feed static GTFS ingestion (RTD Denver + Bustang) with ID namespacing, improving ingestion reliability during agency switching, enabling schedule browsing for routes without direction_id, and restoring RIPTA realtime support via a narrowly scoped cleartext networking exception.

Changes:

  • Add multi-feed static ingestion for RTD Denver (including Bustang) with per-feed ID namespacing and improved ingestion reliability (temp DB + atomic replace, ZipFile streaming, serialized ingests).
  • Allow nullable direction_id through stop/departure selection flows and auto-advance directionless routes.
  • Restore RIPTA realtime feed URLs and reintroduce :netconfig for a host-scoped cleartext exception; update docs accordingly.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tool/src/main/kotlin/com/thelightphone/transit/HomeScreen.kt Cancels stale ingest jobs on agency switch and prevents older ingests from overwriting newer UI state.
tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsRepository.kt Allows nullable direction_id queries for stops/departures to support directionless routes.
tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsIngestor.kt Adds serialized ingestion, multi-feed loading with ID prefixes, ZipFile-based parsing, and temp DB replacement.
tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsAgency.kt Adds RTD additional static feed URL(s) and updates RIPTA realtime documentation/fields.
tool/src/main/kotlin/com/thelightphone/transit/FirstStopSelectionScreen.kt Propagates nullable directionId into stop selection flow.
tool/src/main/kotlin/com/thelightphone/transit/DirectionSelectionScreen.kt Auto-advances directionless routes directly to stop selection.
tool/src/main/kotlin/com/thelightphone/transit/DepartureListScreen.kt Propagates nullable directionId into departure listing flow.
tool/README.md Updates user-facing notes about RIPTA HTTP-only realtime with scoped exception.
tool/build.gradle.kts Documents the RIPTA cleartext exception dependency on :netconfig.
settings.gradle.kts Adds mavenLocal() to dependency resolution repositories.
README.md Updates top-level documentation about RIPTA HTTP-only realtime with scoped exception.
netconfig/src/main/res/xml/network_security_config.xml Restricts cleartext allowance to realtime.ripta.com and updates module comments.
netconfig/src/main/AndroidManifest.xml Supplies networkSecurityConfig via manifest merge for the tool app.
netconfig/build.gradle.kts Simplifies module header commentary while preserving purpose.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread settings.gradle.kts Outdated
Comment on lines 19 to 24
dependencyResolutionManagement {
repositories {
mavenLocal()
google()
mavenCentral()
maven {
Comment on lines +106 to +110
LaunchedEffect(state) {
if (state is DirectionSelectionState.Loaded && (state as DirectionSelectionState.Loaded).directions.isEmpty()) {
navigateTo(screenFactory = { activity ->
FirstStopSelectionScreen(activity, dbFile, routeId, routeLabel, null, "Route")
})

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll investigate and fix this.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, once this is set I'll merge, just a heads up I have a pending commit to add a few more settings. "Show everything" mode which eliminates the need to get per stop taps to show more vehicles and it enables a few more tap and hold navigation features. In addition, home screen is being enabled for a scroll list for Agency feeds so we can add more. someone asked on Reddit for London to be added. Thanks for your support on both the HTTP:// issue and finding a way to get bustang in, I appreciate how you added it as an agency component similar to how MBTA's v3 api is integrated! 🙏.... One note, from what I can see on your recent changes this only seems to add bustang's static feed, meaning live locations for bustang, (unless available through RTD's standard realtime feed) won't show up but scheduled times will.

Comment thread tool/src/main/kotlin/com/thelightphone/transit/gtfs/GtfsIngestor.kt Outdated
jbriones95 and others added 5 commits August 6, 2026 14:01
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
git-subtree-dir: third_party/light-keyboard
git-subtree-split: 1755571b1d3353ecd3c6b68018079903ca4e389b
@jbriones95 jbriones95 changed the title Expand RTD support and restore RIPTA realtime feeds Improve transit search and setup Aug 6, 2026
@CJFData
CJFData merged commit 8a39776 into CJFData:pico-transit Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants